import request from '@/utils/request'

// 新增学校
export function createSchool(data) {
  return request({
    url: '/school/create',
    method: 'post',
    data: data
  })
}

// 获取学校列表
export function getSchoolList(query) {
  return request({
    url: `/school/list`,
    method: 'get',
    params: query
  })
}

// 用户根据学校id获取详情
export function getSchoolById(id) {
  return request({
    url: `/school/${id}`,
    method: 'get',
  })
}

// 修改学校
export function updateSchoolById(params) {
  return request({
    url: `/school/update/${params.id}`,
    method: 'put',
    data: params
  })
}

// 用户根据学校id删除
export function deleteSchoolById(id) {
  return request({
    url: `/school/delete/${id}`,
    method: 'delete'
  })
}


// 获取教育集团列表
export function getEdgroupList(query) {
  return request({
    url: `/edgroup/list`,
    method: 'get',
    params: query
  })
}
